Skip to content

Update function-user.md #2732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

karimegitHub
Copy link

User().Email returns the Email address of the current user.

The text "The User().Email function returns the user's UPN and not the SMTP email address." is incorrect. The User().Email function does not return the user's UPN.

User().Email returns the Email address of the current user.

The text "The User().Email function returns the user's UPN and not the SMTP email address." is incorrect. The User().Email function does not return the user's UPN.
Copy link

Learn Build status updates of commit 2eab0ea:

✅ Validation status: passed

File Status Preview URL Details
power-platform/power-fx/reference/function-user.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@mduelae mduelae added power-fx Issues and updates related to Microsoft Power Fx docs waiting on internal feedback labels May 21, 2025
@mduelae mduelae added the do-not-merge Don't merge this yet label Jun 19, 2025
@gregli-msft
Copy link
Contributor

gregli-msft commented Jun 21, 2025

@karimegitHub, I don't believe you are correct that User().Email returns the email and not the UPN. I wish it was correct.

As an experiment, I've created a user with a different UPN from Email address and User().Email is returning the UPN while Office365Users.MyProfile().Mail returns the email address. Easiest way to update the email without an Exchange license is to use the Microsoft Graph PowerShell Update-MgUser -UserId existing-UPN -Mail new-email-address. Get-MgUser -UserId existing-UPN can be used to read both Mail and UserPrincipalName.

It is a best practice that these are the same, but there are cases where they are not.

I'm going to close this PR for now. If you find evidence that my understand is wrong, please feel free to bring it back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned-to-contributors do-not-merge Don't merge this yet power-fx Issues and updates related to Microsoft Power Fx docs waiting on internal feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants